<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    {{ $store.state.count }}
    <HelloWorld msg="Welcome to Your Vue.js App" />
    <input v-money.float />
    <input v-money.int />
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";

export default {
  name: "HomeView",
  asyncData({ store }) {
    // 约定预取逻辑编写在预取钩⼦asyncData中
    // 触发 action 后，返回 Promise 以便确定请求结果
    return store.dispatch("getCount");
  },
  created() {
    console.log(window);
    console.log(document);
  },
  components: {
    HelloWorld,
  },
};
</script>
